<!doctype html>
<html class="x-admin-sm">
<head>
    <title>个人微信自动回复发朋友圈群发抢红包机器人-微信机器人管理系统</title>
	<meta name="keywords" content="微信自动回复，抢红包机器人，微信群发，定时发朋友圈，个人微信机器人管理系统" />
    <meta name="description" content="个人微信机器人管理系统、微信自动回复、定时发朋友圈、微信群发、抢红包机器人、微信机器人API接口" />
    <#include "/common/common.ftl">
    <link rel="stylesheet" href="/static/xadmin/css/login.css">
</head>
<body class="login-bg">

    <div class="login layui-anim layui-anim-up">
        <div class="message">WeBot管理系统</div>
        <div id="darkbannerwrap"></div>

        <form method="post" class="layui-form">
            <input name="userName" placeholder="登陆账号" type="text" lay-verify="required" class="layui-input">
            <hr class="hr15">
            <input name="password" lay-verify="required" placeholder="登陆密码" type="password" class="layui-input">
            <hr class="hr15">
            <input name="teamName" lay-verify="required" placeholder="团队名称" type="text" class="layui-input">
            <hr class="hr15">
            <input name="phone" lay-verify="required" placeholder="联系电话" type="text" class="layui-input">
            <hr class="hr15">
            <input value="注册" lay-submit lay-filter="login" style="width:100%;" type="submit">
            <hr class="hr20">
            <span><a href="/login" style="text-decoration:underline;color:#2196f3">已有账号，点我登陆</a></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="x-red">*请据实填写信息*</span>
        </form>
    </div>
 
    <script type="text/javascript">
        layui.use(['form', 'layer'], function () {

            var form = layui.form;
            var layer = layui.layer;
            var $ = layui.$;

            form.on('submit(login)', function (data) {
                $("input[type='submit']").prop('disabled', true);
                $("input[type='submit']").val('注册中...');
                $.ajax({
                    type: 'post',
                    url: '/user/register',
                    data: data.field,
                    dataType: 'json',
                    success: function (data) {
                        if (data.code !== 0) {
                            $("input[type='submit']").prop('disabled', false);
                            $("input[type='submit']").val('注册');
                            layer.msg(data.msg);
                            return false;
                        }
                        $("input[type='submit']").val('注册成功，正在跳转...');
                        location.href = '/login';
                    },
                    error: function (XMLHttpRequest, textStatus, errorThrown) {
                        $("input[type='submit']").prop('disabled', false);
                        $("input[type='submit']").val('注册');
                        layer.alert('系统异常');
                    }
                });
                return false;
            });
        });
    </script>
</body>
</html>